import { FormProps } from '/@/components/Form';
import { getActivityNameList } from '/@/api/sys/activityList';
export function getFormConfig(): Partial<FormProps> {
  return {
    labelWidth: 100,
    autoSubmitOnEnter: true,
    schemas: [
      {
        field: 'hd_name',
        component: 'Input',
        label: '活动名称',
        componentProps: {
          placeholder: '请输入活动名称',
        },
        required: true,
      },
      {
        field: 'name',
        component: 'ApiSelect',
        label: '活动周期',
        componentProps: {
          placeholder: '请选择周期',
          api: getActivityNameList,
          resultField: 'list',
          labelField: 'text',
          valueField: 'value',
        },
        required: true,
      },
      {
        field: 'hdTimes',
        component: 'Input',
        label: '活动内领取次数(次/人)',
        componentProps: {
          placeholder: '请输入每人领取次数',
        },
        required: true,
      },
      {
        field: 'time',
        component: 'RangePicker',
        label: '活动时间',
        required: true,
      },
      {
        field: 'money',
        component: 'Input',
        label: '付款金额',
        componentProps: {
          placeholder: '请输入付款金额',
        },
        required: true,
      },
    ],
    fieldMapToTime: [['fieldTime', ['beginTime', 'endTime'], 'YYYY-MM-DD']],
  };
}
